    <!--重要部分-->
<script src="<?php echo SHOP_RESOURCE_SITE_URL.'/js/search_goods.js';?>"></script>
<link href="<?php echo SHOP_TEMPLATES_URL;?>/css/new/classify.css" rel="stylesheet" type="text/css">
<div class="main">
    <div class="main_ct">
        <div class="search_box">
            <div class="title">
                <?php echo !empty($_GET['cate_id'])?$output['goods_class_array'][$_GET['cate_id']]['gc_name']:'所有分类'; ?>>
            </div>
            <div class="inpt">
                <form id="category_sear_form" action="<?php echo SHOP_SITE_URL;?>" method="get" >
                    <input name="act" id="search_act" value="category" type="hidden">
                    <input name="op" id="search_op" value="new_index" type="hidden">
                    <input name="cate_id" id="search_op" value="<?php echo $_GET['cate_id']; ?>" type="hidden">
                    <input type="text" name="keyword" placeholder="当前分类下搜索">
                    <div class="ui_img" onclick="$('#category_sear_form').submit()">
                        <a href="#">
                            <img src="<?php echo SHOP_TEMPLATES_URL;?>/images/newimages/searimg1.png" alt="">
                        </a>
                    </div>
                </form>
            </div>
            <div class="rigspan">
                共<?php echo $output['total_num'];?>件相关商品
            </div>
        </div>
        <!--分类列表-->
        <?php if(!empty($output['show_goods_class']) && is_array($output['show_goods_class'])){?>
        <div class="nav_list">
				<span>
					分类：
				</span>
            <ul id="category_list">
                <?php foreach($output['show_goods_class'] as $key=>$gc_list){?>
                    <a href="<?php echo urlShop('category','index',array('cate_id'=>$gc_list['gc_id']));?>">
                        <li class="<?php if($_GET['cate_id']==$gc_list['gc_id']){echo 'active';} ?>"><?php echo $gc_list['gc_name']; ?></li>
                    </a>
                <?php }?>
            </ul>
        </div>
        <?php }?>
        <!--排序-->
        <div class="sort">
            <ul>
                <a href="#">
                    <li class="<?php if(!$_GET['key']){?>active<?php }?>">
                        <a href="<?php echo dropParam(array('order', 'key'));?>"  title="<?php echo $lang['goods_class_index_default_sort'];?>">
                            <span>综合排序</span>
                        </a>
                    </li>
                </a>
                <a href="#">
                    <li class="<?php if($_GET['key'] == '1'){?>active<?php }?>">
                        <a href="<?php echo ($_GET['order'] == '2' && $_GET['key'] == '1') ? replaceParam(array('key' => '1', 'order' => '1')):replaceParam(array('key' => '1', 'order' => '2')); ?>" <?php if($_GET['key'] == '1'){?>class="<?php echo $_GET['order'] == 1 ? 'asc' : 'desc';?>"<?php }?> title="<?php echo ($_GET['order'] == '2' && $_GET['key'] == '1')?$lang['goods_class_index_sold_asc']:$lang['goods_class_index_sold_desc']; ?>">
                            <span>销量</span>
                        </a>
                        <span>
                            <img src="<?php echo SHOP_TEMPLATES_URL.($_GET['order'] == '2'?'/images/newimages/sortimg1.png':'/images/newimages/sortimg0.png');?>" alt="">
                        </span>
                    </li>
                </a>
                <a href="#">
                    <li class="<?php if($_GET['key'] == '2'){?>active<?php }?>">
                        <a href="<?php echo ($_GET['order'] == '2' && $_GET['key'] == '2') ? replaceParam(array('key' => '2', 'order' => '1')):replaceParam(array('key' => '2', 'order' => '2')); ?>" <?php if($_GET['key'] == '2'){?>class="<?php echo $_GET['order'] == 1 ? 'asc' : 'desc';?>"<?php }?> title="<?php  echo ($_GET['order'] == '2' && $_GET['key'] == '2')?$lang['goods_class_index_click_asc']:$lang['goods_class_index_click_desc']; ?>">
                            <span>人气</span>
                        </a>
                        <span>
                            <img src="<?php echo SHOP_TEMPLATES_URL.($_GET['order'] == '2'?'/images/newimages/sortimg1.png':'/images/newimages/sortimg0.png');?>" alt="">
                        </span>
                    </li>
                </a>
                <a href="#">
                    <li class="<?php if($_GET['key'] == '3'){?>active<?php }?>">
                        <a href="<?php echo ($_GET['order'] == '2' && $_GET['key'] == '3') ? replaceParam(array('key' => '3', 'order' => '1')):replaceParam(array('key' => '3', 'order' => '2')); ?>" <?php if($_GET['key'] == '3'){?>class="<?php echo $_GET['order'] == 1 ? 'asc' : 'desc';?>"<?php }?> title="<?php echo ($_GET['order'] == '2' && $_GET['key'] == '3')?$lang['goods_class_index_price_asc']:$lang['goods_class_index_price_desc']; ?>">
                            <span>价格</span>
                        </a>
                        <span>
                            <img src="<?php echo SHOP_TEMPLATES_URL.($_GET['order'] == '2'?'/images/newimages/sortimg1.png':'/images/newimages/sortimg0.png');?>" alt="">
                        </span>
                    </li>
                </a>
            </ul>
            <div class="sunr">
                <?php echo $output['show_page1'];?>
<!--                <span>1/100</span>-->
<!--                <span class="prev"> <a href=""> < </a> </span>-->
<!--                <span class="next"> <a href=""> > </a> </span>-->
            </div>
        </div>
        <div class="cplist_box">
            <div class="list_box">
                <?php if(!empty($output['goods_list']) && is_array($output['goods_list'])){?>
                <ul>
                    <!--产品列表-->
                    <?php foreach($output['goods_list'] as $value){?>
                    <li>
                        <div class="cpImg">
                            <a href="<?php echo urlShop('goods','index',array('goods_id'=>$value['goods_id']));?>" target="_blank" title="<?php echo $value['goods_name'];?>"><img src="<?php echo cthumb($value['goods_image'], 240,$value['store_id']);?>" title="<?php echo $value['goods_name'];?>" alt="<?php echo $value['goods_name'];?>" /></a>
                        </div>
                        <div class="title">
                            <?php echo $value['goods_name'];?>
                        </div>
                        <div class="sum">
                            <?php $goods_price = explode('.',$value['goods_promotion_price']);?>
                            ￥<span><?php echo $goods_price[0]; ?></span>.<?php echo $goods_price[1]; ?>
                            <div class="ui_img">
                                <a href="javascript:void(0);" nctype="add_cart" data-gid="<?php echo $value['goods_id'];?>">
                                    <img src="<?php echo SHOP_TEMPLATES_URL;?>/images/newimages/ui_img2.png" alt="">
                                </a>
                            </div>
                        </div>
                    </li>
                    <?php } ?>
                </ul>
                <?php } ?>
            </div>
            <div class="page_box">
                <?php echo $output['show_page'];?>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/fly/jquery.fly.min.js" charset="utf-8"></script>
<script>
    $(function(){
        var len = $('#category_list>li').length;
        var max_width = 0;
        for(var i=0;i<len;i++){
            var width = $('#category_list>li').eq(i).width();
            if(width>max_width){
                max_width = width;
            }
        }
        $('#category_list>li').width(max_width)
    });
</script>